package lagou.MapTest.CollectionTest;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionPrintfTest {
    public static void main(String[] args) {
        Collection c1 = new ArrayList();//可动态扩容数组集合
        c1.add("one");
        c1.add(2);
        c1.add("one");
        c1.add(new Person("闫坤",18));
        System.out.println("集合是什么："+c1);
        for (Object obj:c1){
            System.out.println("c1中的"+obj);
        }
    }
}
